/* Archive Extractor
 * Copyright 2008-2009 Matthew Hoops
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * $URL: http://archive-extractor.googlecode.com/svn/trunk/file_reader.h $
 * $Id: file_reader.h 2 2009-03-23 01:29:43Z clone2727 $
 *
 */

// This file contains functions for reading integers in an endian-safe manner.

#ifndef FILE_READER_H
#define FILE_READER_H

#include <cstdio>
#include "arc_util.h"

byte readByte(FILE *handle);
int8 readSint8(FILE *handle);
uint16 readUint16LE(FILE *handle);
int16 readSint16LE(FILE *handle);
uint16 readUint16BE(FILE *handle);
int16 readSint16BE(FILE *handle);
//uint32 readUint24(FILE *handle);
//int32 readSint24(FILE *handle);
uint32 readUint32BE(FILE *handle);
int32 readSint32BE(FILE *handle);
uint32 readUint32LE(FILE *handle);
int32 readSint32LE(FILE *handle);

uint32 getFileSize(FILE *handle);

#endif
